import { createApp } from 'vue'
// import 'default-passive-events'
import './style.css'
import App from './App.vue'
import {setupPinia} from './store/index'
import {setupRouter} from "./routes/index"
// import VueSocketio from 'vue-socket.io'; 
import Socketio from "./plugins/socket-io";
// 初始化应用程序
function initApplication(){
	const app = createApp(App);
	// 加载状态管理器
	setupPinia(app)
	// 加载路由
	setupRouter(app)
	// new VueSocketio({
	// 	debug:false,
	// 	connection:'http://127.0.0.1:5000'
	// })
	app.use(Socketio, {
	  connection: 'http://127.0.0.1:5000',
	  options: {
	    autoConnect: false, //关闭自动连接
		timeout: 300000,
		reconnectionDelayMax: 1000,
		reconnectionDelay: 500
	    // ...其它选项
	  },
	});
	app.mount('#app')
}
void initApplication()


